package com.itheima.wms.mapper;

import com.itheima.wms.pojo.Area;
import com.itheima.wms.pojo.AreaDto;
import com.itheima.wms.pojo.AreaPageRequest;
import com.itheima.wms.pojo.LocationVO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface AreaMapper {

    public List<Area> queryAreaPageByCondition(@Param("start") Integer start, @Param("pageSize") Integer pageSize, @Param("areaPageRequest") AreaPageRequest areaPageRequest);

    public Long queryAreaCount();

    public Area queryAreaById(@Param("id") Long id);

    public void insertArea(@Param("area") Area area);

    public void updateArea(@Param("area") Area area);

    public void stopAndStartArea(@Param("area") Area area);

    public void removeByIds(@Param("id") Long id);

    public List<Area> queryareaList(@Param("areaPageRequest") AreaDto areaPageRequest);

    public Long getOldId(Area area);

    public void plusIncludeNum(Long id);

    public void minusIncludeNum(Long id);

    List<LocationVO> countIsUseOrFree(Long id);
}
